package com.xcity.game.skill.state;

/**
 * 技能阶段
 * @author yang.li
 *
 */
@Deprecated
public enum Phase {

	LEARN("学习", false, State.DISABLE), // 学习阶段
	STUDY("进修", true, State.UNACTIVATED), // 进修阶段
	@Deprecated PRACTICE("实践", true, State.ACTIVATED), // 实践阶段
	;
	
	public static final byte STATE_PAUSED = 0; // 暂停进修/实践
	public static final byte STATE_RUNNING = 1; // 学习/进修/实践中
	
	public final String name;
	public final boolean pausable; // 是否可暂停
	public final State preconditionForRunning; // 进行该阶段的前提条件
	
	Phase(String name, boolean pausable, State preconditionForRunning) {
		this.name = name;
		this.pausable = pausable;
		this.preconditionForRunning = preconditionForRunning;
	}
	
	public static Phase getPhaseByLevel(int level) {
//		if (level > 9) {
//			return PRACTICE;
//		}
		if (level > 0) {
			return STUDY;
		}
		return LEARN;
	}
	
}
